package com.deng.service;

import com.deng.mapper.UserMapper;
import com.deng.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @create 2020-12-15 15:12
 */
@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    /**
     * @param username
     * @param password
     * @return 返回记录条数
     */
    public int register(String username, String password) {
        return userMapper.regist(username, password);
    }

    public User login(String username, String password) {
        return userMapper.login(username, password);
    }

    public User findUserByName(String username) {
        return userMapper.findUserByName(username);
    }
}

